home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DTP / DTP_TEX / 2848F.ZIP / INPUTS2.ARC / BK10.DOC < prev    next >
Text File  |  1987-12-15  |  19KB  |  452 lines

  1. % BOOK DOCUMENT STYLE -- Released 9 June 1987
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1987 by Leslie Lamport
  4.  
  5. % PREPARING A FOREIGN LANGUAGE VERSION:
  6. %
  7. % This document style is for documents prepared in the English language.
  8. % To prepare a version for another language, various English words must
  9. % be replaced.  All the English words that required replacement are
  10. % indicated below, where we give the name of the command in which the
  11. % words appear, and the entire line containing the word(s), with the
  12. % actual words underlined.
  13. % \part:
  14. %       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  15. %                ~~~~
  16. % \appendix:
  17. %   \def\@chapapp{Appendix}
  18. %                 ~~~~~~~~
  19.  
  20. %  ****************************************
  21. %  *               FONTS                  *
  22. %  ****************************************
  23. %
  24.  
  25. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  26. \normallineskip 1pt
  27. \def\baselinestretch{1}
  28.  
  29. % Each size-changing command \SIZE executes the command
  30. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  31. % where:
  32. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  33. %                  value will be \baselinestretch * BASELINESKIP.)
  34. %
  35. %  \FONTSIZE     = Name of font-size command.  The currently available
  36. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  37. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  38. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  39. %  \@FONTSIZE    = The same as the font-size command except with an
  40. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  41. %                  \@FONTSIZE = \@xivpt.
  42. %
  43. % For reasons of efficiency that needn't concern the designer,
  44. % the document style defines \@normalsize instead of \normalsize .  This is
  45. % done only for \normalsize, not for any other size-changing commands.
  46.  
  47. \def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
  48. \abovedisplayskip 10pt plus2pt minus5pt%
  49. \belowdisplayskip \abovedisplayskip
  50. \abovedisplayshortskip  \z@ plus3pt%   
  51. \belowdisplayshortskip  6pt plus3pt minus3pt%
  52. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  53.  
  54.  
  55. \def\small{\@setsize\small{11pt}\ixpt\@ixpt
  56. \abovedisplayskip 8.5pt plus 3pt minus 4pt%
  57. \belowdisplayskip \abovedisplayskip
  58. \abovedisplayshortskip \z@ plus2pt%
  59. \belowdisplayshortskip 4pt plus2pt minus 2pt
  60. \def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  61. \itemsep \parsep}}
  62.  
  63. \def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
  64. \abovedisplayskip 6pt plus 2pt minus 4pt%
  65. \belowdisplayskip \abovedisplayskip
  66. \abovedisplayshortskip \z@ plus 1pt%
  67. \belowdisplayshortskip 3pt plus 1pt minus 2pt
  68. \def\@listi{\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
  69. \itemsep \parsep}}
  70.  
  71. \def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
  72. \def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
  73. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  74. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  75. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  76. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  77. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  78.  
  79. \normalsize  % Choose the normalsize font.
  80.  
  81.  
  82. %  ****************************************
  83. %  *            PAGE LAYOUT               *
  84. %  ****************************************
  85. %
  86. % All margin dimensions measured from a point one inch from top and side
  87. % of page.  
  88.  
  89. % SIDE MARGINS:
  90. \oddsidemargin .5in      % Left margin on odd-numbered pages.
  91. \evensidemargin 1.5in      % Left margin on even-numbered pages.
  92.  
  93. \marginparwidth .75in    %   Width of marginal notes.
  94. \marginparsep 7pt        % Horizontal space between outer margin and 
  95.                          % marginal note
  96.  
  97.  
  98. % VERTICAL SPACING:        
  99.                          % Top of page:
  100. \topmargin .75in         %    Nominal distance from top of page to top of
  101.                          %    box containing running head.
  102. \headheight 12pt         %    Height of box containing running head.
  103. \headsep   .25in         %    Space between running head and text.
  104. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  105.                          % Bottom of page:
  106. \footskip .35in          %    Distance from baseline of box containing foot 
  107.                          %    to baseline of last line of text.
  108.  
  109.  
  110. % DIMENSION OF TEXT:
  111. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  112. % The value of the multiplier was calculated as the floor of the
  113. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  114. % The old value of \textheight was 504pt.
  115. % \textheight is the height of text (including footnotes and figures, 
  116. % excluding running head and foot).
  117.  
  118. \textheight = 41\baselineskip
  119. \advance\textheight by \topskip
  120.  
  121. \textwidth 4.5in         % Width of text line.
  122.                          % For two-column mode: 
  123. \columnsep 10pt          %    Space between columns 
  124. \columnseprule 0pt       %    Width of rule between columns.
  125.  
  126. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  127. % natural height instead of being stretched to exactly \textheight.
  128.  
  129. % FOOTNOTES:
  130.  
  131. \footnotesep 6.65pt   % Height of strut placed at the beginning of every
  132.                       % footnote = height of normal \footnotesize strut,
  133.                       % so no extra space between footnotes.
  134.  
  135. \skip\footins 9pt plus 4pt minus 2pt  % Space between last line of text and 
  136.                                       % top of first footnote.
  137.  
  138. % FLOATS: (a float is something like a figure or table)
  139. %
  140. %  FOR FLOATS ON A TEXT PAGE:
  141. %
  142. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  143. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  144.                                          % to top or bottom of text page.
  145. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  146.                                          % at top or bottom of page.
  147. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and 
  148.                                          % text.
  149. \@maxsep 20pt                            % The maximum of \floatsep, 
  150.                                          % \textfloatsep and \intextsep (minus
  151.                                          % the stretch and shrink).
  152. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  153. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  154.                                          % figures in two-column mode.
  155. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  156.                                          % floats.
  157. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  158.                                          % \dbltexfloatsep.
  159.  
  160. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  161. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  162. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  163.                          % 0pt plus ...)                                    
  164. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.       
  165. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  166.                          % 0pt plus ... )                                   
  167.  
  168. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  169. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  170. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  171. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  172.                          % 0pt plus ... )                                   
  173. % MARGINAL NOTES:
  174. %
  175. \marginparpush 5pt       % Minimum vertical separation between two marginal 
  176.                          % notes.
  177.  
  178.  
  179. %  ****************************************
  180. %  *           PARAGRAPHING               *
  181. %  ****************************************
  182. %
  183. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  184. \parindent 15pt                    % Width of paragraph indentation.
  185. %\topsep 8pt plus 2pt minus 4pt    % Extra vertical space, in addition to 
  186.                                    % \parskip, added above and below list and
  187.                                    % paragraphing environments.
  188. \partopsep 2pt plus 1pt minus 1pt  % Extra vertical space, in addition to 
  189.                                    % \parskip and \topsep, added when user
  190.                                    % leaves blank line before environment.
  191. %\itemsep 4pt plus 2pt minus 1pt   % Extra vertical space, in addition to
  192.                                    % \parskip, added between list items.
  193. % See \@listI for values of \topsep and \itemsep
  194. % (Change made 9 Jun 87)
  195.  
  196. % The following page-breaking penalties are defined
  197.  
  198. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  199. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  200. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  201.  
  202. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  203. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  204. \@itempenalty     -\@lowpenalty    % Between list items.
  205.  
  206. % \clubpenalty         % 'Club line'  at bottom of page.
  207. % \widowpenalty        % 'Widow line' at top of page.
  208. % \displaywidowpenalty % Math display widow line.
  209. % \predisplaypenalty   % Breaking before a math display.
  210. % \postdisplaypenalty  % Breaking after a math display.
  211. % \interlinepenalty    % Breaking at a line within a paragraph.
  212. % \brokenpenalty       % Breaking after a hyphenated line.
  213.  
  214.  
  215. %    ****************************************
  216. %    *        CHAPTERS AND SECTIONS         *
  217. %    ****************************************
  218. %
  219. %
  220.  
  221. \def\part{\cleardoublepage   % Starts new page.
  222.    \thispagestyle{plain}     % Page style of part page is 'plain'
  223.   \if@twocolumn              % IF two-column style
  224.      \onecolumn              %  THEN \onecolumn
  225.      \@tempswatrue           %       @tempswa := true
  226.     \else \@tempswafalse     %  ELSE @tempswa := false
  227.   \fi                        % FI
  228.   \hbox{}\vfil               % Add fil glue to center title  
  229.   \bgroup  \centering        % BEGIN centering
  230.   \secdef\@part\@spart}     
  231.  
  232.  
  233. \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  234.         \refstepcounter{part}                     %   THEN step part counter
  235.         \addcontentsline{toc}{part}{\thepart      %        add toc line
  236.         \hspace{1em}#1}\else                      %   ELSE add unnumbered line
  237.         \addcontentsline{toc}{part}{#1}\fi        % FI
  238.    \markboth{}{}
  239.     \ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  240.       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  241.     \par                             %         in \huge bold.
  242.     \vskip 20pt \fi                  %        Add space before title.
  243.     \Huge \bf                        % FI
  244.     #1\@endpart}                     % Print Title in \Huge bold.
  245.     
  246.     
  247. % \@endpart finishes the part page
  248. %
  249. \def\@endpart{\par\egroup     % END centering 
  250.    \vfil\newpage              % End page with 1fil glue.
  251.    \if@twoside                % IF twoside printing
  252.        \hbox{}                %   THEN Produce totally blank page
  253.        \thispagestyle{empty}  
  254.        \newpage        
  255.    \fi                        % FI
  256.    \if@tempswa                % IF @tempswa = true       
  257.      \twocolumn               %   THEN \twocolumn 
  258.    \fi}                       % FI
  259.  
  260. \def\@spart#1{\Huge \bf                      % Print title in \huge boldface
  261.    #1\@endpart}
  262.  
  263.  
  264.  
  265. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  266. %
  267.  
  268. \def\@makechapterhead#1{             % Heading for \chapter command
  269.   \vspace*{50pt}                     % Space at top of text page.
  270.   { \parindent 0pt \raggedright 
  271.     \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
  272.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  273.     \par 
  274.     \vskip 20pt \fi                    % Space between number and title.
  275.     \Huge \bf                        % Title.
  276.     #1\par 
  277.     \nobreak                         % TeX penalty to prevent page break.
  278.     \vskip 40pt                      % Space between title and text.
  279.   } }
  280.  
  281. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  282. %
  283.  
  284. \def\@makeschapterhead#1{             % Heading for \chapter* command
  285.   \vspace*{50pt}                     % Space at top of page.
  286.   { \parindent 0pt \raggedright 
  287.     \Huge \bf                        % Title.
  288.     #1\par 
  289.     \nobreak                         % TeX penalty to prevent page break.
  290.     \vskip 40pt                      % Space between title and text.
  291.   } }
  292.  
  293. % \secdef{UNSTARCMDS}{STARCMDS} :
  294. %    When defining a \chapter or \section command without using
  295. %    \@startsection, you can use \secdef as follows:
  296. %       \def\chapter { ... \secdef \CMDA \CMDB }
  297. %       \def\CMDA    [#1]#2{ ... }  % Command to define \chapter[...]{...}
  298. %       \def\CMDB    #1{ ... }      % Command to define \chapter*{...}
  299.  
  300. \def\chapter{\cleardoublepage % Starts new right-hand page.
  301.    \thispagestyle{plain}     % Page style of chapter page is 'plain'
  302.    \global\@topnum\z@        % Prevents figures from going at top of page.
  303.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  304.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  305.  
  306. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  307.         \refstepcounter{chapter}
  308.         \typeout{\@chapapp\space\thechapter.}
  309.         \addcontentsline{toc}{chapter}{\protect
  310.         \numberline{\thechapter}#1}\else
  311.       \addcontentsline{toc}{chapter}{#1}\fi
  312.    \chaptermark{#1}
  313.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  314.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  315.    \if@twocolumn                                 % Tests for two-column mode.  
  316.            \@topnewpage[\@makechapterhead{#2}]  
  317.      \else \@makechapterhead{#2}
  318.            \@afterheading                  % Routine called after chapter and
  319.      \fi}                                  % section heading.
  320.  
  321. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  322.         \else \@makeschapterhead{#1} 
  323.               \@afterheading\fi}
  324.  
  325. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  326. %            optional * [ALTHEADING]{HEADING}
  327. %    Generic command to start a section.  
  328. %    NAME       : e.g., 'subsection'
  329. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  330. %                 section = 2, etc.  A section number will be printed if
  331. %                 and only if LEVEL < or = the value of the secnumdepth
  332. %                 counter.
  333. %    INDENT     : Indentation of heading from left margin
  334. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  335. %                 If negative, then paragraph indent of text following 
  336. %                 heading is suppressed.
  337. %    AFTERSKIP  : if positive, then skip to leave below heading,
  338. %                       else - skip to leave to right of run-in heading.
  339. %    STYLE      : commands to set style
  340. %  If '*' missing, then increments the counter.  If it is present, then
  341. %  there should be no [ALTHEADING] argument.  A sectioning command
  342. %  is normally defined to \@startsection + its first six arguments.
  343.  
  344. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  345.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  346. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  347.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  348. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  349. -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  350. \def\paragraph{\@startsection
  351.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  352. \def\subparagraph{\@startsection
  353.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  354.      .2ex}{-1em}{\normalsize\bf}}
  355.  
  356.  
  357. % Default initializations of \...mark commands.  (See below for their
  358. % us in defining page styles.
  359. %
  360.  
  361. \def\chaptermark#1{}
  362. % \def\sectionmark#1{}           % Preloaded definitions
  363. % \def\subsectionmark#1{}
  364. % \def\subsubsectionmark#1{}
  365. % \def\paragraphmark#1{}
  366. % \def\subparagraphmark#1{}
  367.  
  368. % The value of the counter secnumdepth gives the depth of the
  369. % highest-level sectioning command that is to produce section numbers.
  370. %
  371.  
  372. \setcounter{secnumdepth}{2}
  373.  
  374. % APPENDIX
  375. %
  376. % The \appendix command must do the following:
  377. %    -- reset the chapter counter to zero
  378. %    -- set \@chapapp to Appendix (for messages)
  379. %    -- redefine the chapter counter to produce appendix numbers
  380. %    -- reset the section counter to zero
  381. %    -- redefine the \chapter command if appendix titles and headings are
  382. %       to look different from chapter titles and headings.
  383.  
  384. \def\appendix{\par
  385.   \setcounter{chapter}{0}
  386.   \setcounter{section}{0}
  387.   \def\@chapapp{Appendix}
  388.   \def\thechapter{\Alph{chapter}}}
  389.  
  390.  
  391. %    ****************************************
  392. %    *                LISTS                 *
  393. %    ****************************************
  394. %
  395.  
  396. % The following commands are used to set the default values for the list
  397. % environment's parameters. See the LaTeX manual for an explanation of
  398. % the meanings of the parameters.  Defaults for the list environment are
  399. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  400. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  401. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  402. % called for a third-level list.)  By convention, \@listK should set
  403. % \leftmargin to \leftmarginK.
  404. %
  405. % For efficiency, level-one list's values are defined at top level, and
  406. % \@listi is defined to set only \leftmargin.
  407.  
  408. \leftmargini 25pt
  409. \leftmarginii 22pt     % > \labelsep + width of '(m)'
  410. \leftmarginiii 18.7pt  % > \labelsep + width of 'vii.'
  411. \leftmarginiv 17pt     % > \labelsep + width of 'M.'
  412. \leftmarginv 10pt
  413. \leftmarginvi 10pt
  414.  
  415. \leftmargin\leftmargini
  416. \labelsep 5pt
  417. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  418. % \parsep 4pt plus 2pt minus 1pt (Removed 9 Jun 87)
  419.  
  420. % \@listI defines top level and \@listi values of
  421. % \leftmargin, \topsep, \parsep, and \itemsep
  422. % (Added 9 Jun 87)
  423. \def\@listI{\leftmargin\leftmargini \parsep 4pt plus 2pt minus 1pt%
  424. \topsep 8pt plus 2pt minus 4pt%
  425. \itemsep 4pt plus 2pt minus 1pt}
  426.  
  427. \let\@listi\@listI
  428. \@listi 
  429.  
  430. \def\@listii{\leftmargin\leftmarginii
  431.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  432.    \topsep 4pt plus 2pt minus 1pt
  433.    \parsep 2pt plus 1pt minus 1pt
  434.    \itemsep \parsep}
  435.  
  436. \def\@listiii{\leftmargin\leftmarginiii
  437.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  438.     \topsep 2pt plus 1pt minus 1pt 
  439.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  440.     \itemsep \topsep}
  441.  
  442. \def\@listiv{\leftmargin\leftmarginiv
  443.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  444.  
  445. \def\@listv{\leftmargin\leftmarginv
  446.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  447.  
  448. \def\@listvi{\leftmargin\leftmarginvi
  449.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  450.  
  451.